///////////////////////////////////////////////////////////////////////////////
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
///////////////////////////////////////////////////////////////////////////////
using System;
using System.Windows;

using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.UnityExtensions;
using Microsoft.Practices.Composite.Logging;

using DominionCS.Views;
using Dominion;

namespace DominionCS
{
    public partial class Bootstrapper : UnityBootstrapper
    {
        private readonly EnterpriseLibraryLogger _logger = new EnterpriseLibraryLogger();

        protected override void ConfigureContainer()
        {
            base.ConfigureContainer();
        }

        protected override IModuleCatalog GetModuleCatalog()
        {
            return ModuleCatalog.CreateFromXaml(
                        new Uri("/DominionCS;component/ModuleCatalog.xaml", UriKind.Relative));
        }

        protected override ILoggerFacade LoggerFacade
        {
            get { return _logger; }
        }

        protected override DependencyObject CreateShell()
        {
            // Use the container to create an instance of the shell.
            ShellView view = Container.TryResolve<ShellView>();

            // Display the shell's root visual.
            view.Show();

            return view;
        }
    }
}

